package com.jy.api.dao;

import com.jy.api.domain.StorePay;
import com.jy.api.enums.OrderPayChannel;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface StorePayDao extends CrudRepository<StorePay,Integer> {


    StorePay  findByStoreIdAndStartEnabled(String storeId,boolean startEnabled);

    List<StorePay> findByStoreId(String storeId);

    List<StorePay> findByStoreNameLike(String name);

    Page<StorePay> findAll(Pageable pageable);

    StorePay findAllByChannelAndStoreId(OrderPayChannel channel,String storeId);

    List<StorePay> findAllByMchIdIsNotNullAndStartEnabled(boolean enabled);

}
